package com.yax.mickey.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yax.mickey.entity.Category;
import com.yax.mickey.service.CategoryService;
import com.yax.mickey.mapper.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author yax
* @description 针对表【category(商品分类表)】的数据库操作Service实现
* @createDate 2024-05-27 09:04:07
*/
@Service

public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category>
implements CategoryService {

    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public List<Category> getAllCategories() {
        return categoryMapper.getAllCategories();
    }
    @Override
    public Category getCategoryByCategoryId(Integer categroyId) {
        return categoryMapper.getCategoryByCategoryId(categroyId);
    }

    @Override
    public Category getCategoryByCategoryName(String categoryName) {
        return categoryMapper.getCategoryByCategoryName(categoryName);
    }
}



